package com.jctrip.hotel.management.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.jctrip.hotel.management.model.result.Result;
import com.jctrip.hotel.management.service.InfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: zxy
 * @CreateTime: 2023-09-11 19:33
 * @Description:
 */
@Slf4j
@Api(tags = "main-info")
@RestController
@RequestMapping("/info")
public class InfoController {

    @Autowired
    private InfoService infoService;

    @GetMapping("/listHotels")
    @ApiOperation(value = "listHotels", notes = "获取渠道编码列表")
    @ApiOperationSupport(order = 1)
    public Result<List<String>> listHotels(){
        return Result.ok(infoService.getHotels());
    }
}
